import { DomWarBeaOtherPartBase } from "./DomWarBeaOtherPartBase";
import { ObjCreate } from "../../../common/ObjCreate";
import { Language } from "../../../../../../extend/language/Language";
import { GlobalStyle } from "../../../../../common/global/GlobalStyle";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { SDominionAuctionCityInfo } from "../../../../../../Message/Public/SDominionAuctionCityInfo";
import { ProxyConfig } from "../../../../resource/ProxyConfig";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
//class AuctionCityRightPart
    
    export  class AuctionCityRightPart extends DomWarBeaOtherPartBase
    {
        constructor(arg1: string="", arg2: Boolean=true, arg3: string="", arg4: number=590, arg5: number=480)
        {
            super(arg1, arg2, arg3, arg4, arg5);
            return;
        }

        protected /* override */ configUI(): void
        {
            super.configUI();
            var loc1=18;
            var loc2=70;
            var loc3=42;
            var loc4=18;
            ObjCreate.createGTextField(Language.getString(90629) + ":", loc1, loc3, 100, 20, this);
            loc3 = loc3 + loc4;
            this._auctionCityTxt = ObjCreate.createGTextField("", loc2, loc3, 100, 20, this, GlobalStyle.textFormat2);
            loc3 = loc3 + loc4;
            ObjCreate.createGTextField(Language.getString(90628) + ":", loc1, loc3, 100, 20, this);
            loc3 = loc3 + loc4;
            this._nationalPowerTxt = ObjCreate.createGTextField("", loc2, loc3, 100, 20, this, GlobalStyle.textFormat2);
            this._nationalPowerTxt.autoSize = "left";
            loc3 = loc3 + 20;
            ObjCreate.createBg(17, loc3, 176, 2, this, ImagesConst.SplitLine);
            loc3 = loc3 + 4;
            ObjCreate.createGTextField(Language.getString(90631) + ":", loc1, loc3, 100, 20, this);
            loc3 = loc3 + loc4;
            this._selfNationPowerTxt = ObjCreate.createGTextField("", loc2, loc3, 100, 20, this, GlobalStyle.textFormat2);
            this._selfNationPowerTxt.autoSize = "left";
            loc3 = loc3 + 20;
            ObjCreate.createBg(17, loc3, 176, 2, this, ImagesConst.SplitLine);
            loc3 = loc3 + 4;
            ObjCreate.createGTextField(Language.getString(90630) + ":", loc1, loc3, 100, 20, this);
            loc3 = loc3 + loc4;
            this._auctionCapitalTxt = ObjCreate.createGTextField("", loc2, loc3, 100, 20, this, GlobalStyle.textFormat2);
            this._auctionCapitalTxt.autoSize = "left";
            loc3 = loc3 + 20;
            ObjCreate.createBg(17, loc3, 176, 2, this, ImagesConst.SplitLine);
            loc3 = loc3 + 4;
            ObjCreate.createGTextField(Language.getString(90634) + ":", loc1, loc3, 100, 20, this);
            loc3 = loc3 + loc4;
            this._serCapitalTxt = ObjCreate.createGTextField("", loc2, loc3, 100, 20, this, GlobalStyle.textFormat2);
            this._serCapitalTxt.autoSize = "left";
            loc3 = loc3 + 20;
            ObjCreate.createBg(17, loc3, 176, 2, this, ImagesConst.SplitLine);
            loc3 = loc3 + 4;
            var loc5;
            (loc5 = ObjCreate.createGTextField("", loc1, loc3, 100, 20, this, GlobalStyle.textFormat5)).multiline = true;
            loc5.autoSize = "left";
            loc5.htmlText = "<font leading=\'2\'>" + Language.getString(90632) + "</font>";
            return;
        }

        protected /* override */ onImageLoaded(): void
        {
            super.onImageLoaded();
            this._titleBg2.visible = false;
            this._titleTxtImg2.visible = false;
            return;
        }

        public /* override */ update(arg1: Object): void
        {
            this.info = arg1 as SDominionAuctionCityInfo;
            var loc1=ProxyConfig.instance.getProxyName(this.info.auctionId.proxyId) + "_" + this.info.auctionId.serverId;
            this._auctionCityTxt.text = "[" + loc1 + "]";
            this._auctionCapitalTxt.text = this.info.usedSource.toString();
            this._selfNationPowerTxt.text = this.info.combat.toString();
            this._nationalPowerTxt.text = this.info.cityOwnCombat.toString();
            this._serCapitalTxt.text = this.info.source.toString();
            return;
        }

        /* internal */ /* var */_auctionCityTxt: GTextFiled;

        /* internal */ /* var */_nationalPowerTxt: GTextFiled;

        /* internal */ /* var */_selfNationPowerTxt: GTextFiled;

        /* internal */ /* var */_auctionCapitalTxt: GTextFiled;

        /* internal */ /* var */_serCapitalTxt: GTextFiled;

        /* internal */ /* var */info: SDominionAuctionCityInfo;
    }
